import { Router } from 'express';
const router = Router();

import Valid from '../../middleware/validation';
import { getBranches, getBranchesSchema } from './branches';
import * as localApp from './local-app';
import * as repoPagesList from './repoPagesList';

// 获取Git仓库分支 GET:/api/utils/branches
router.get('/branches', Valid.query(getBranchesSchema), getBranches);

// 获取 本地App信息，即git仓库clone到本地之后的信息  GET:/api/utils/branches
router.get('/local-app', Valid.query(localApp.validator), localApp.api);

// 获取 本地App信息，即git仓库clone到本地之后的信息  GET:/api/utils/branches
router.get('/repoPagesList', Valid.query(repoPagesList.validator), repoPagesList.api);

export default router;
